% COZZI AND IMPULLITTI (2015), GLOBALIZATION AND WAGE POLARIZATION, REVIEW
% OF ECONOMICS AND STATISTICS

% RUN FILE FOR THE CALIBRATION

clear all

% This is the outer run file for the calibration
format long
    
%Starting value:
 
X0=[1.6290 0.5  10.8514   0.5230    0.0337    2.2674 ] ; 


 % Parameters to calibrate: zD1 = X(1); eserv = X(2); epsi = X(3); beta =
 % X(4); phi = X(5); AD = X(6);


options = optimset('TolFun',1e-7,'TolX',1e-7);

[x,fval,exitflag,output] =fminsearch(@Cali_fun_Piketty,X0,options);



%             if exitflag<0
%                 disp('Cazzi amari!');
%                 %pause
%             return
%             end



